<template>
  <div id="detailsgashaponlist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">

               
                <el-table-column label="时间"  align='center'  width="250">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.time }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="帐号"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.telphone }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="姓名"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.nickname }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="金额"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.price }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="特殊奖励"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.special == 0">不是</span>
                        <span v-if="scope.row.special == 1">是</span>
                    </template>
                </el-table-column>
                <el-table-column label="方式"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'KMB' ">{{ variable_name1 }}</span>
                        <span v-if="scope.row.type == 'GDB' ">{{ variable_name2 }}</span>
                        <span v-if="scope.row.type == 'CASH' ">现金</span>
                        <span v-if="scope.row.type == 'RANGE_CASH' ">现金</span>
                    </template>
                </el-table-column>

                 <el-table-column label="奖池"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'KMB' ">银蛋</span>
                        <span v-if="scope.row.type == 'GDB' ">银蛋</span>
                        <span v-if="scope.row.type == 'CASH' ">金蛋</span>
                        <span v-if="scope.row.type == 'RANGE_CASH' ">彩蛋</span>
                    </template>
                </el-table-column>

                 <!-- <el-table-column label="微信"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'CASH' ">
                               <el-image v-if="scope.row.srcListwx"
                                    style="width: 30px; height: 30px"
                                    :src="urlimg + scope.row.srcListwx" 
                                    :preview-src-list="scope.row.srcList1" class="imga">
                               </el-image>
                               <span v-else>暂未上传</span> 
                        </span>
                        <span v-else>--</span>
                    </template>
                </el-table-column>

                 <el-table-column label="支付宝"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'CASH' ">
                              <el-image v-if="scope.row.srcListzfb"
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.srcListzfb" 
                                :preview-src-list="scope.row.srcList2" class="imga">
                             </el-image>
                             <span v-else>暂未上传</span>
                        </span>
                        <span v-else>--</span>
                    </template>
                </el-table-column> -->

                 <el-table-column label="银行卡"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'CASH' || scope.row.type == 'RANGE_CASH' ">
                              <el-image v-if="scope.row.srcListyhk"
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.srcListyhk" 
                                :preview-src-list="scope.row.srcList5" class="imga">
                             </el-image>
                             <span v-else>暂未上传</span>
                        </span>
                        <span v-else>--</span>
                    </template>
                </el-table-column>

                 <el-table-column label="操作" align='center' width="200" fixed="right">
                    <template slot-scope="scope">  
                         <span v-if="scope.row.cash_send == 0">                          
                            <el-button v-if="scope.row.type == 'CASH' || scope.row.type == 'RANGE_CASH'" size="mini"  type="primary"  plain  @click="ff_but(scope.row)">发放</el-button>  
                        </span> 
                        <span v-if="scope.row.cash_send == 1">   
                            已发放
                        </span>                                       
                    </template>
                </el-table-column>
    
            </el-table>  

   </div>
</template>

<script>

export default {
   name: 'detailsgashaponlist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 253
      
  },
  mounted (){
    
  },
  methods: {
    
    ff_but(row){
         this.$confirm('是否发放奖励, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
         }).then(() => {
            this.post("/lottery_shake/cashSend", {
                    id:row.id,
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    }else {
                    this.open1(res.message,'warning')
                }

             })
        }).catch(() => {
              
        });
    },


  }
}
</script>


<style scoped>
.imga>>>.el-icon-circle-close {
      color: white;
}
</style>